//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS SecurityLake service.
///
/// Amazon Security Lake is a fully managed security data lake service. You can use Security Lake to automatically centralize security data from cloud, on-premises, and custom sources into a data lake that's stored in your Amazon Web Services account. Amazon Web Services Organizations is an account management service that lets you consolidate multiple Amazon Web Services accounts into an organization that you create and centrally manage. With Organizations, you can create member accounts and invite existing accounts to join your organization. Security Lake helps you analyze security data for a more complete understanding of your security posture across the entire organization. It can also help you improve the protection of your workloads, applications, and data. The data lake is backed by Amazon Simple Storage Service (Amazon S3) buckets, and you retain ownership over your data. Amazon Security Lake integrates with CloudTrail, a service that provides a record of actions taken by a user, role, or an Amazon Web Services service. In Security Lake, CloudTrail captures API calls for Security Lake as events. The calls captured include calls from the Security Lake console and code calls to the Security Lake API operations. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Security Lake. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in Event history. Using the information collected by CloudTrail you can determine the request that was made to Security Lake, the IP address from which the request was made, who made the request, when it was made, and additional details. To learn more about Security Lake information in CloudTrail, see the Amazon Security Lake User Guide. Security Lake automates the collection of security-related log and event data from integrated Amazon Web Services services and third-party services. It also helps you manage the lifecycle of data with customizable retention and replication settings. Security Lake converts ingested data into Apache Parquet format and a standard open-source schema called the Open Cybersecurity Schema Framework (OCSF). Other Amazon Web Services services and third-party services can subscribe to the data that's stored in Security Lake for  incident response and security data analytics.
public struct SecurityLake: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the SecurityLake client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "SecurityLake",
            serviceIdentifier: "securitylake",
            serviceProtocol: .restjson,
            apiVersion: "2018-05-10",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: SecurityLakeErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.dualstack, .fips]: .init(endpoints: [
            "us-east-1": "securitylake-fips.us-east-1.api.aws",
            "us-east-2": "securitylake-fips.us-east-2.api.aws",
            "us-gov-east-1": "securitylake.us-gov-east-1.api.aws",
            "us-gov-west-1": "securitylake.us-gov-west-1.api.aws",
            "us-west-1": "securitylake-fips.us-west-1.api.aws",
            "us-west-2": "securitylake-fips.us-west-2.api.aws"
        ]),
        [.fips]: .init(endpoints: [
            "us-east-1": "securitylake-fips.us-east-1.amazonaws.com",
            "us-east-2": "securitylake-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "securitylake.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "securitylake.us-gov-west-1.amazonaws.com",
            "us-west-1": "securitylake-fips.us-west-1.amazonaws.com",
            "us-west-2": "securitylake-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Adds a natively supported Amazon Web Services service as an Amazon Security Lake source. Enables source types for member accounts in required Amazon Web Services Regions, based on the parameters you specify. You can choose any source type in any Region for either accounts that are part of a trusted organization or standalone accounts. Once you add an Amazon Web Services service as a source, Security Lake starts collecting logs and events from it. You can use this API only to enable natively supported Amazon Web Services services as a source. Use CreateCustomLogSource to enable data collection from a custom source.
    @Sendable
    @inlinable
    public func createAwsLogSource(_ input: CreateAwsLogSourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateAwsLogSourceResponse {
        try await self.client.execute(
            operation: "CreateAwsLogSource", 
            path: "/v1/datalake/logsources/aws", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a natively supported Amazon Web Services service as an Amazon Security Lake source. Enables source types for member accounts in required Amazon Web Services Regions, based on the parameters you specify. You can choose any source type in any Region for either accounts that are part of a trusted organization or standalone accounts. Once you add an Amazon Web Services service as a source, Security Lake starts collecting logs and events from it. You can use this API only to enable natively supported Amazon Web Services services as a source. Use CreateCustomLogSource to enable data collection from a custom source.
    ///
    /// Parameters:
    ///   - sources: Specify the natively-supported Amazon Web Services service to add as a source in Security Lake.
    ///   - logger: Logger use during operation
    @inlinable
    public func createAwsLogSource(
        sources: [AwsLogSourceConfiguration],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateAwsLogSourceResponse {
        let input = CreateAwsLogSourceRequest(
            sources: sources
        )
        return try await self.createAwsLogSource(input, logger: logger)
    }

    /// Adds a third-party custom source in Amazon Security Lake, from the Amazon Web Services Region where you want to create a custom source. Security Lake can collect logs and events from third-party custom sources. After creating the appropriate IAM role to invoke Glue crawler, use this API to add a custom source name in Security Lake. This operation creates a partition in the Amazon S3 bucket for Security Lake as the target location for log files from the custom source. In addition, this operation also creates an associated Glue table and an Glue crawler.
    @Sendable
    @inlinable
    public func createCustomLogSource(_ input: CreateCustomLogSourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateCustomLogSourceResponse {
        try await self.client.execute(
            operation: "CreateCustomLogSource", 
            path: "/v1/datalake/logsources/custom", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a third-party custom source in Amazon Security Lake, from the Amazon Web Services Region where you want to create a custom source. Security Lake can collect logs and events from third-party custom sources. After creating the appropriate IAM role to invoke Glue crawler, use this API to add a custom source name in Security Lake. This operation creates a partition in the Amazon S3 bucket for Security Lake as the target location for log files from the custom source. In addition, this operation also creates an associated Glue table and an Glue crawler.
    ///
    /// Parameters:
    ///   - configuration: The configuration used for the third-party custom source.
    ///   - eventClasses: The Open Cybersecurity Schema Framework (OCSF) event classes which describes the type of data that the custom source will send to Security Lake. For the list of supported event classes, see the Amazon Security Lake User Guide.
    ///   - sourceName: Specify the name for a third-party custom source. This must be a Regionally unique value. The sourceName you enter here, is used in the LogProviderRole name which follows the convention AmazonSecurityLake-Provider-{name of the custom source}-{region}. You must use a CustomLogSource name that is shorter than or equal to 20 characters. This ensures that the LogProviderRole name is below the 64 character limit.
    ///   - sourceVersion: Specify the source version for the third-party custom source, to limit log collection to a specific version of custom data source.
    ///   - logger: Logger use during operation
    @inlinable
    public func createCustomLogSource(
        configuration: CustomLogSourceConfiguration,
        eventClasses: [String]? = nil,
        sourceName: String,
        sourceVersion: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateCustomLogSourceResponse {
        let input = CreateCustomLogSourceRequest(
            configuration: configuration, 
            eventClasses: eventClasses, 
            sourceName: sourceName, 
            sourceVersion: sourceVersion
        )
        return try await self.createCustomLogSource(input, logger: logger)
    }

    /// Initializes an Amazon Security Lake instance with the provided (or default) configuration. You can enable Security Lake in Amazon Web Services Regions with customized settings before enabling log collection in Regions. To specify particular Regions, configure these Regions using the configurations parameter. If you have already enabled Security Lake in a Region when you call this command, the command will update the Region if you provide new configuration parameters. If you have not already enabled Security Lake in the Region when you call this API, it will set up the data lake in the Region with the specified configurations. When you enable Security Lake, it starts ingesting security data after the CreateAwsLogSource call and after you create subscribers using the CreateSubscriber API. This includes ingesting security data from sources, storing data, and making data accessible to subscribers. Security Lake also enables all the existing settings and resources that it stores or maintains for your Amazon Web Services account in the current Region, including security log and event data. For more information, see the Amazon Security Lake User Guide.
    @Sendable
    @inlinable
    public func createDataLake(_ input: CreateDataLakeRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDataLakeResponse {
        try await self.client.execute(
            operation: "CreateDataLake", 
            path: "/v1/datalake", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Initializes an Amazon Security Lake instance with the provided (or default) configuration. You can enable Security Lake in Amazon Web Services Regions with customized settings before enabling log collection in Regions. To specify particular Regions, configure these Regions using the configurations parameter. If you have already enabled Security Lake in a Region when you call this command, the command will update the Region if you provide new configuration parameters. If you have not already enabled Security Lake in the Region when you call this API, it will set up the data lake in the Region with the specified configurations. When you enable Security Lake, it starts ingesting security data after the CreateAwsLogSource call and after you create subscribers using the CreateSubscriber API. This includes ingesting security data from sources, storing data, and making data accessible to subscribers. Security Lake also enables all the existing settings and resources that it stores or maintains for your Amazon Web Services account in the current Region, including security log and event data. For more information, see the Amazon Security Lake User Guide.
    ///
    /// Parameters:
    ///   - configurations: Specify the Region or Regions that will contribute data to the rollup region.
    ///   - metaStoreManagerRoleArn: The Amazon Resource Name (ARN) used to create and update the Glue table. This table contains partitions generated by the ingestion and normalization of Amazon Web Services log sources and custom sources.
    ///   - tags: An array of objects, one for each tag to associate with the data lake configuration. For each tag, you must specify both a tag key and a tag value. A tag  value cannot be null, but it can be an empty string.
    ///   - logger: Logger use during operation
    @inlinable
    public func createDataLake(
        configurations: [DataLakeConfiguration],
        metaStoreManagerRoleArn: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDataLakeResponse {
        let input = CreateDataLakeRequest(
            configurations: configurations, 
            metaStoreManagerRoleArn: metaStoreManagerRoleArn, 
            tags: tags
        )
        return try await self.createDataLake(input, logger: logger)
    }

    /// Creates the specified notification subscription in Amazon Security Lake for the organization you specify. The notification subscription is created for exceptions that cannot be resolved by Security Lake automatically.
    @Sendable
    @inlinable
    public func createDataLakeExceptionSubscription(_ input: CreateDataLakeExceptionSubscriptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDataLakeExceptionSubscriptionResponse {
        try await self.client.execute(
            operation: "CreateDataLakeExceptionSubscription", 
            path: "/v1/datalake/exceptions/subscription", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates the specified notification subscription in Amazon Security Lake for the organization you specify. The notification subscription is created for exceptions that cannot be resolved by Security Lake automatically.
    ///
    /// Parameters:
    ///   - exceptionTimeToLive: The expiration period and time-to-live (TTL). It is the duration of time until which the exception message remains.
    ///   - notificationEndpoint: The Amazon Web Services account where you want to receive exception notifications.
    ///   - subscriptionProtocol: The subscription protocol to which exception notifications are posted.
    ///   - logger: Logger use during operation
    @inlinable
    public func createDataLakeExceptionSubscription(
        exceptionTimeToLive: Int64? = nil,
        notificationEndpoint: String,
        subscriptionProtocol: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDataLakeExceptionSubscriptionResponse {
        let input = CreateDataLakeExceptionSubscriptionRequest(
            exceptionTimeToLive: exceptionTimeToLive, 
            notificationEndpoint: notificationEndpoint, 
            subscriptionProtocol: subscriptionProtocol
        )
        return try await self.createDataLakeExceptionSubscription(input, logger: logger)
    }

    /// Automatically enables Amazon Security Lake for new member accounts in your organization. Security Lake is not automatically enabled for any existing member accounts in your organization. This operation merges the new data lake organization configuration with the existing configuration for Security Lake in your organization. If you want to create a new data lake organization configuration, you must delete the existing one using DeleteDataLakeOrganizationConfiguration.
    @Sendable
    @inlinable
    public func createDataLakeOrganizationConfiguration(_ input: CreateDataLakeOrganizationConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDataLakeOrganizationConfigurationResponse {
        try await self.client.execute(
            operation: "CreateDataLakeOrganizationConfiguration", 
            path: "/v1/datalake/organization/configuration", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Automatically enables Amazon Security Lake for new member accounts in your organization. Security Lake is not automatically enabled for any existing member accounts in your organization. This operation merges the new data lake organization configuration with the existing configuration for Security Lake in your organization. If you want to create a new data lake organization configuration, you must delete the existing one using DeleteDataLakeOrganizationConfiguration.
    ///
    /// Parameters:
    ///   - autoEnableNewAccount: Enable Security Lake with the specified configuration settings, to begin collecting security data for new accounts in your organization.
    ///   - logger: Logger use during operation
    @inlinable
    public func createDataLakeOrganizationConfiguration(
        autoEnableNewAccount: [DataLakeAutoEnableNewAccountConfiguration]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDataLakeOrganizationConfigurationResponse {
        let input = CreateDataLakeOrganizationConfigurationRequest(
            autoEnableNewAccount: autoEnableNewAccount
        )
        return try await self.createDataLakeOrganizationConfiguration(input, logger: logger)
    }

    /// Creates a subscriber for accounts that are already enabled in Amazon Security Lake. You can create a subscriber with access to data in the current Amazon Web Services Region.
    @Sendable
    @inlinable
    public func createSubscriber(_ input: CreateSubscriberRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateSubscriberResponse {
        try await self.client.execute(
            operation: "CreateSubscriber", 
            path: "/v1/subscribers", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a subscriber for accounts that are already enabled in Amazon Security Lake. You can create a subscriber with access to data in the current Amazon Web Services Region.
    ///
    /// Parameters:
    ///   - accessTypes: The Amazon S3 or Lake Formation access type.
    ///   - sources: The supported Amazon Web Services services from which logs and events are collected. Security Lake supports log and event collection for natively supported Amazon Web Services services.
    ///   - subscriberDescription: The description for your subscriber account in Security Lake.
    ///   - subscriberIdentity: The Amazon Web Services identity used to access your data.
    ///   - subscriberName: The name of your Security Lake subscriber account.
    ///   - tags: An array of objects, one for each tag to associate with the subscriber. For each tag, you must specify both a tag key and a tag value. A tag  value cannot be null, but it can be an empty string.
    ///   - logger: Logger use during operation
    @inlinable
    public func createSubscriber(
        accessTypes: [AccessType]? = nil,
        sources: [LogSourceResource],
        subscriberDescription: String? = nil,
        subscriberIdentity: AwsIdentity,
        subscriberName: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateSubscriberResponse {
        let input = CreateSubscriberRequest(
            accessTypes: accessTypes, 
            sources: sources, 
            subscriberDescription: subscriberDescription, 
            subscriberIdentity: subscriberIdentity, 
            subscriberName: subscriberName, 
            tags: tags
        )
        return try await self.createSubscriber(input, logger: logger)
    }

    /// Notifies the subscriber when new data is written to the data lake for the sources that the subscriber consumes in Security Lake. You can create only one subscriber notification per subscriber.
    @Sendable
    @inlinable
    public func createSubscriberNotification(_ input: CreateSubscriberNotificationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateSubscriberNotificationResponse {
        try await self.client.execute(
            operation: "CreateSubscriberNotification", 
            path: "/v1/subscribers/{subscriberId}/notification", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Notifies the subscriber when new data is written to the data lake for the sources that the subscriber consumes in Security Lake. You can create only one subscriber notification per subscriber.
    ///
    /// Parameters:
    ///   - configuration: Specify the configuration using which you want to create the subscriber notification.
    ///   - subscriberId: The subscriber ID for the notification subscription.
    ///   - logger: Logger use during operation
    @inlinable
    public func createSubscriberNotification(
        configuration: NotificationConfiguration,
        subscriberId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateSubscriberNotificationResponse {
        let input = CreateSubscriberNotificationRequest(
            configuration: configuration, 
            subscriberId: subscriberId
        )
        return try await self.createSubscriberNotification(input, logger: logger)
    }

    /// Removes a natively supported Amazon Web Services service as an Amazon Security Lake source. You can remove a source for one or more Regions. When you remove the source, Security Lake stops collecting data from that source in the specified Regions and accounts, and subscribers can no longer consume new data from the source. However, subscribers can still consume data that Security Lake collected from the source before removal. You can choose any source type in any Amazon Web Services Region for either accounts that are part of a trusted organization or standalone accounts.
    @Sendable
    @inlinable
    public func deleteAwsLogSource(_ input: DeleteAwsLogSourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAwsLogSourceResponse {
        try await self.client.execute(
            operation: "DeleteAwsLogSource", 
            path: "/v1/datalake/logsources/aws/delete", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a natively supported Amazon Web Services service as an Amazon Security Lake source. You can remove a source for one or more Regions. When you remove the source, Security Lake stops collecting data from that source in the specified Regions and accounts, and subscribers can no longer consume new data from the source. However, subscribers can still consume data that Security Lake collected from the source before removal. You can choose any source type in any Amazon Web Services Region for either accounts that are part of a trusted organization or standalone accounts.
    ///
    /// Parameters:
    ///   - sources: Specify the natively-supported Amazon Web Services service to remove as a source in Security Lake.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAwsLogSource(
        sources: [AwsLogSourceConfiguration],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAwsLogSourceResponse {
        let input = DeleteAwsLogSourceRequest(
            sources: sources
        )
        return try await self.deleteAwsLogSource(input, logger: logger)
    }

    /// Removes a custom log source from Amazon Security Lake, to stop sending data from the custom source to Security Lake.
    @Sendable
    @inlinable
    public func deleteCustomLogSource(_ input: DeleteCustomLogSourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteCustomLogSourceResponse {
        try await self.client.execute(
            operation: "DeleteCustomLogSource", 
            path: "/v1/datalake/logsources/custom/{sourceName}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a custom log source from Amazon Security Lake, to stop sending data from the custom source to Security Lake.
    ///
    /// Parameters:
    ///   - sourceName: The source name of custom log source that you want to delete.
    ///   - sourceVersion: The source version for the third-party custom source. You can limit the custom source removal to the specified source version.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteCustomLogSource(
        sourceName: String,
        sourceVersion: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteCustomLogSourceResponse {
        let input = DeleteCustomLogSourceRequest(
            sourceName: sourceName, 
            sourceVersion: sourceVersion
        )
        return try await self.deleteCustomLogSource(input, logger: logger)
    }

    /// When you disable Amazon Security Lake from your account, Security Lake is disabled in all Amazon Web Services Regions and it stops collecting data from your sources. Also, this API automatically takes steps to remove the account from Security Lake. However, Security Lake retains all of your existing settings and the resources that it created in your Amazon Web Services account in the current Amazon Web Services Region. The DeleteDataLake operation does not delete the data that is stored in your Amazon S3 bucket, which is owned by your Amazon Web Services account. For more information, see the Amazon Security Lake User Guide.
    @Sendable
    @inlinable
    public func deleteDataLake(_ input: DeleteDataLakeRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteDataLakeResponse {
        try await self.client.execute(
            operation: "DeleteDataLake", 
            path: "/v1/datalake/delete", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// When you disable Amazon Security Lake from your account, Security Lake is disabled in all Amazon Web Services Regions and it stops collecting data from your sources. Also, this API automatically takes steps to remove the account from Security Lake. However, Security Lake retains all of your existing settings and the resources that it created in your Amazon Web Services account in the current Amazon Web Services Region. The DeleteDataLake operation does not delete the data that is stored in your Amazon S3 bucket, which is owned by your Amazon Web Services account. For more information, see the Amazon Security Lake User Guide.
    ///
    /// Parameters:
    ///   - regions: The list of Regions where Security Lake is enabled.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteDataLake(
        regions: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteDataLakeResponse {
        let input = DeleteDataLakeRequest(
            regions: regions
        )
        return try await self.deleteDataLake(input, logger: logger)
    }

    /// Deletes the specified notification subscription in Amazon Security Lake for the organization you specify.
    @Sendable
    @inlinable
    public func deleteDataLakeExceptionSubscription(_ input: DeleteDataLakeExceptionSubscriptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteDataLakeExceptionSubscriptionResponse {
        try await self.client.execute(
            operation: "DeleteDataLakeExceptionSubscription", 
            path: "/v1/datalake/exceptions/subscription", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified notification subscription in Amazon Security Lake for the organization you specify.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteDataLakeExceptionSubscription(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteDataLakeExceptionSubscriptionResponse {
        let input = DeleteDataLakeExceptionSubscriptionRequest(
        )
        return try await self.deleteDataLakeExceptionSubscription(input, logger: logger)
    }

    /// Turns off automatic enablement of Amazon Security Lake for member accounts that are added to an organization in Organizations. Only the delegated  Security Lake administrator for an organization can perform this operation. If the delegated Security Lake administrator performs this operation, new member accounts won't automatically contribute data to the data lake.
    @Sendable
    @inlinable
    public func deleteDataLakeOrganizationConfiguration(_ input: DeleteDataLakeOrganizationConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteDataLakeOrganizationConfigurationResponse {
        try await self.client.execute(
            operation: "DeleteDataLakeOrganizationConfiguration", 
            path: "/v1/datalake/organization/configuration/delete", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Turns off automatic enablement of Amazon Security Lake for member accounts that are added to an organization in Organizations. Only the delegated  Security Lake administrator for an organization can perform this operation. If the delegated Security Lake administrator performs this operation, new member accounts won't automatically contribute data to the data lake.
    ///
    /// Parameters:
    ///   - autoEnableNewAccount: Turns off automatic enablement of Security Lake for member accounts that are added to an organization.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteDataLakeOrganizationConfiguration(
        autoEnableNewAccount: [DataLakeAutoEnableNewAccountConfiguration]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteDataLakeOrganizationConfigurationResponse {
        let input = DeleteDataLakeOrganizationConfigurationRequest(
            autoEnableNewAccount: autoEnableNewAccount
        )
        return try await self.deleteDataLakeOrganizationConfiguration(input, logger: logger)
    }

    /// Deletes the subscription permission and all notification settings for accounts that are already enabled in Amazon Security Lake. When you run DeleteSubscriber, the subscriber will no longer consume data from Security Lake and the subscriber is removed. This operation deletes the subscriber and removes access to data in the current Amazon Web Services Region.
    @Sendable
    @inlinable
    public func deleteSubscriber(_ input: DeleteSubscriberRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteSubscriberResponse {
        try await self.client.execute(
            operation: "DeleteSubscriber", 
            path: "/v1/subscribers/{subscriberId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the subscription permission and all notification settings for accounts that are already enabled in Amazon Security Lake. When you run DeleteSubscriber, the subscriber will no longer consume data from Security Lake and the subscriber is removed. This operation deletes the subscriber and removes access to data in the current Amazon Web Services Region.
    ///
    /// Parameters:
    ///   - subscriberId: A value created by Security Lake that uniquely identifies your DeleteSubscriber API request.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteSubscriber(
        subscriberId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteSubscriberResponse {
        let input = DeleteSubscriberRequest(
            subscriberId: subscriberId
        )
        return try await self.deleteSubscriber(input, logger: logger)
    }

    /// Deletes the specified subscription notification in Amazon Security Lake for the organization you specify.
    @Sendable
    @inlinable
    public func deleteSubscriberNotification(_ input: DeleteSubscriberNotificationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteSubscriberNotificationResponse {
        try await self.client.execute(
            operation: "DeleteSubscriberNotification", 
            path: "/v1/subscribers/{subscriberId}/notification", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified subscription notification in Amazon Security Lake for the organization you specify.
    ///
    /// Parameters:
    ///   - subscriberId: The ID of the Security Lake subscriber account.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteSubscriberNotification(
        subscriberId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteSubscriberNotificationResponse {
        let input = DeleteSubscriberNotificationRequest(
            subscriberId: subscriberId
        )
        return try await self.deleteSubscriberNotification(input, logger: logger)
    }

    /// Deletes the Amazon Security Lake delegated administrator account for the organization. This API can only be called by the organization management account. The organization management account cannot be the delegated administrator account.
    @Sendable
    @inlinable
    public func deregisterDataLakeDelegatedAdministrator(_ input: DeregisterDataLakeDelegatedAdministratorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeregisterDataLakeDelegatedAdministratorResponse {
        try await self.client.execute(
            operation: "DeregisterDataLakeDelegatedAdministrator", 
            path: "/v1/datalake/delegate", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the Amazon Security Lake delegated administrator account for the organization. This API can only be called by the organization management account. The organization management account cannot be the delegated administrator account.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func deregisterDataLakeDelegatedAdministrator(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeregisterDataLakeDelegatedAdministratorResponse {
        let input = DeregisterDataLakeDelegatedAdministratorRequest(
        )
        return try await self.deregisterDataLakeDelegatedAdministrator(input, logger: logger)
    }

    /// Retrieves the protocol and endpoint that were provided when subscribing to Amazon SNS topics for exception notifications.
    @Sendable
    @inlinable
    public func getDataLakeExceptionSubscription(_ input: GetDataLakeExceptionSubscriptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDataLakeExceptionSubscriptionResponse {
        try await self.client.execute(
            operation: "GetDataLakeExceptionSubscription", 
            path: "/v1/datalake/exceptions/subscription", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the protocol and endpoint that were provided when subscribing to Amazon SNS topics for exception notifications.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getDataLakeExceptionSubscription(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDataLakeExceptionSubscriptionResponse {
        let input = GetDataLakeExceptionSubscriptionRequest(
        )
        return try await self.getDataLakeExceptionSubscription(input, logger: logger)
    }

    /// Retrieves the configuration that will be automatically set up for accounts added to the organization after the organization has onboarded to Amazon Security Lake. This API does not take input parameters.
    @Sendable
    @inlinable
    public func getDataLakeOrganizationConfiguration(_ input: GetDataLakeOrganizationConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDataLakeOrganizationConfigurationResponse {
        try await self.client.execute(
            operation: "GetDataLakeOrganizationConfiguration", 
            path: "/v1/datalake/organization/configuration", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the configuration that will be automatically set up for accounts added to the organization after the organization has onboarded to Amazon Security Lake. This API does not take input parameters.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getDataLakeOrganizationConfiguration(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDataLakeOrganizationConfigurationResponse {
        let input = GetDataLakeOrganizationConfigurationRequest(
        )
        return try await self.getDataLakeOrganizationConfiguration(input, logger: logger)
    }

    /// Retrieves a snapshot of the current Region, including whether Amazon Security Lake is enabled for those accounts and which sources Security Lake is collecting data from.
    @Sendable
    @inlinable
    public func getDataLakeSources(_ input: GetDataLakeSourcesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDataLakeSourcesResponse {
        try await self.client.execute(
            operation: "GetDataLakeSources", 
            path: "/v1/datalake/sources", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a snapshot of the current Region, including whether Amazon Security Lake is enabled for those accounts and which sources Security Lake is collecting data from.
    ///
    /// Parameters:
    ///   - accounts: The Amazon Web Services account ID for which a static snapshot of the current Amazon Web Services Region, including enabled accounts and log sources, is retrieved.
    ///   - maxResults: The maximum limit of accounts for which the static snapshot of the current Region, including enabled accounts and log sources, is retrieved.
    ///   - nextToken: Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDataLakeSources(
        accounts: [String]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDataLakeSourcesResponse {
        let input = GetDataLakeSourcesRequest(
            accounts: accounts, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.getDataLakeSources(input, logger: logger)
    }

    /// Retrieves the subscription information for the specified subscription ID. You can get information about a specific subscriber.
    @Sendable
    @inlinable
    public func getSubscriber(_ input: GetSubscriberRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetSubscriberResponse {
        try await self.client.execute(
            operation: "GetSubscriber", 
            path: "/v1/subscribers/{subscriberId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the subscription information for the specified subscription ID. You can get information about a specific subscriber.
    ///
    /// Parameters:
    ///   - subscriberId: A value created by Amazon Security Lake that uniquely identifies your GetSubscriber API request.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSubscriber(
        subscriberId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetSubscriberResponse {
        let input = GetSubscriberRequest(
            subscriberId: subscriberId
        )
        return try await self.getSubscriber(input, logger: logger)
    }

    /// Lists the Amazon Security Lake exceptions that you can use to find the source of problems and fix them.
    @Sendable
    @inlinable
    public func listDataLakeExceptions(_ input: ListDataLakeExceptionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDataLakeExceptionsResponse {
        try await self.client.execute(
            operation: "ListDataLakeExceptions", 
            path: "/v1/datalake/exceptions", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the Amazon Security Lake exceptions that you can use to find the source of problems and fix them.
    ///
    /// Parameters:
    ///   - maxResults: Lists the maximum number of failures in Security Lake.
    ///   - nextToken: Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
    ///   - regions: The Amazon Web Services Regions from which exceptions are retrieved.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDataLakeExceptions(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        regions: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDataLakeExceptionsResponse {
        let input = ListDataLakeExceptionsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            regions: regions
        )
        return try await self.listDataLakeExceptions(input, logger: logger)
    }

    /// Retrieves the Amazon Security Lake configuration object for the specified Amazon Web Services Regions. You can use this operation to determine whether Security Lake is enabled for a Region.
    @Sendable
    @inlinable
    public func listDataLakes(_ input: ListDataLakesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDataLakesResponse {
        try await self.client.execute(
            operation: "ListDataLakes", 
            path: "/v1/datalakes", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the Amazon Security Lake configuration object for the specified Amazon Web Services Regions. You can use this operation to determine whether Security Lake is enabled for a Region.
    ///
    /// Parameters:
    ///   - regions: The list of Regions where Security Lake is enabled.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDataLakes(
        regions: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDataLakesResponse {
        let input = ListDataLakesRequest(
            regions: regions
        )
        return try await self.listDataLakes(input, logger: logger)
    }

    /// Retrieves the log sources.
    @Sendable
    @inlinable
    public func listLogSources(_ input: ListLogSourcesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListLogSourcesResponse {
        try await self.client.execute(
            operation: "ListLogSources", 
            path: "/v1/datalake/logsources/list", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the log sources.
    ///
    /// Parameters:
    ///   - accounts: The list of Amazon Web Services accounts for which log sources are displayed.
    ///   - maxResults: The maximum number of accounts for which the log sources are displayed.
    ///   - nextToken: If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page.
    ///   - regions: The list of Regions for which log sources are displayed.
    ///   - sources: The list of sources for which log sources are displayed.
    ///   - logger: Logger use during operation
    @inlinable
    public func listLogSources(
        accounts: [String]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        regions: [String]? = nil,
        sources: [LogSourceResource]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListLogSourcesResponse {
        let input = ListLogSourcesRequest(
            accounts: accounts, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            regions: regions, 
            sources: sources
        )
        return try await self.listLogSources(input, logger: logger)
    }

    /// Lists all subscribers for the specific Amazon Security Lake account ID. You can retrieve a list of subscriptions associated with a specific organization or Amazon Web Services account.
    @Sendable
    @inlinable
    public func listSubscribers(_ input: ListSubscribersRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListSubscribersResponse {
        try await self.client.execute(
            operation: "ListSubscribers", 
            path: "/v1/subscribers", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all subscribers for the specific Amazon Security Lake account ID. You can retrieve a list of subscriptions associated with a specific organization or Amazon Web Services account.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of accounts for which the configuration is displayed.
    ///   - nextToken: If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page.
    ///   - logger: Logger use during operation
    @inlinable
    public func listSubscribers(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListSubscribersResponse {
        let input = ListSubscribersRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listSubscribers(input, logger: logger)
    }

    /// Retrieves the tags (keys and values) that are associated with an Amazon Security Lake resource: a subscriber, or the data lake configuration for  your Amazon Web Services account in a particular Amazon Web Services Region.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/v1/tags/{resourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the tags (keys and values) that are associated with an Amazon Security Lake resource: a subscriber, or the data lake configuration for  your Amazon Web Services account in a particular Amazon Web Services Region.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the Amazon Security Lake resource for which you want to retrieve the tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Designates the Amazon Security Lake delegated administrator account for the organization. This API can only be called by the organization management account. The organization management account cannot be the delegated administrator account.
    @Sendable
    @inlinable
    public func registerDataLakeDelegatedAdministrator(_ input: RegisterDataLakeDelegatedAdministratorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> RegisterDataLakeDelegatedAdministratorResponse {
        try await self.client.execute(
            operation: "RegisterDataLakeDelegatedAdministrator", 
            path: "/v1/datalake/delegate", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Designates the Amazon Security Lake delegated administrator account for the organization. This API can only be called by the organization management account. The organization management account cannot be the delegated administrator account.
    ///
    /// Parameters:
    ///   - accountId: The Amazon Web Services account ID of the Security Lake delegated administrator.
    ///   - logger: Logger use during operation
    @inlinable
    public func registerDataLakeDelegatedAdministrator(
        accountId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> RegisterDataLakeDelegatedAdministratorResponse {
        let input = RegisterDataLakeDelegatedAdministratorRequest(
            accountId: accountId
        )
        return try await self.registerDataLakeDelegatedAdministrator(input, logger: logger)
    }

    /// Adds or updates one or more tags that are associated with an Amazon Security Lake resource: a subscriber, or the data lake configuration for your  Amazon Web Services account in a particular Amazon Web Services Region. A tag is a label that you can define and associate with  Amazon Web Services resources. Each tag consists of a required tag key and an associated tag value. A  tag key is a general label that acts as a category for a more specific tag value. A tag value acts as a  descriptor for a tag key. Tags can help you identify, categorize, and manage resources in different ways, such as by owner, environment, or other  criteria. For more information, see  Tagging Amazon Security Lake resources in the  Amazon Security Lake User Guide.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/v1/tags/{resourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds or updates one or more tags that are associated with an Amazon Security Lake resource: a subscriber, or the data lake configuration for your  Amazon Web Services account in a particular Amazon Web Services Region. A tag is a label that you can define and associate with  Amazon Web Services resources. Each tag consists of a required tag key and an associated tag value. A  tag key is a general label that acts as a category for a more specific tag value. A tag value acts as a  descriptor for a tag key. Tags can help you identify, categorize, and manage resources in different ways, such as by owner, environment, or other  criteria. For more information, see  Tagging Amazon Security Lake resources in the  Amazon Security Lake User Guide.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the Amazon Security Lake resource to add or update the tags for.
    ///   - tags: An array of objects, one for each tag (key and value) to associate with the Amazon Security Lake resource. For each tag, you must  specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes one or more tags (keys and values) from an Amazon Security Lake resource: a subscriber, or the data lake configuration for your  Amazon Web Services account in a particular Amazon Web Services Region.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/v1/tags/{resourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags (keys and values) from an Amazon Security Lake resource: a subscriber, or the data lake configuration for your  Amazon Web Services account in a particular Amazon Web Services Region.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the Amazon Security Lake resource to remove one or more tags from.
    ///   - tagKeys: A list of one or more tag keys. For each value in the list, specify the tag key for a tag to remove from the Amazon Security Lake resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// You can use UpdateDataLake to specify where to store your security data, how it should be encrypted at rest and for how long. You can add a Rollup Region to consolidate data from multiple Amazon Web Services Regions, replace default encryption (SSE-S3) with Customer Manged Key, or specify transition and expiration actions through storage Lifecycle management. The UpdateDataLake API works as an "upsert" operation that performs an insert if the specified item or record does not exist, or an update if it already exists. Security Lake securely stores your data at rest using Amazon Web Services encryption solutions. For more details, see Data protection in Amazon Security Lake. For example, omitting the key encryptionConfiguration from a Region that is included in an update call that currently uses KMS will leave that Region's KMS key in place, but specifying encryptionConfiguration: {kmsKeyId: 'S3_MANAGED_KEY'} for that same Region will reset the key to S3-managed. For more details about lifecycle management and how to update retention settings for one or more Regions after enabling Security Lake, see the Amazon Security Lake User Guide.
    @Sendable
    @inlinable
    public func updateDataLake(_ input: UpdateDataLakeRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateDataLakeResponse {
        try await self.client.execute(
            operation: "UpdateDataLake", 
            path: "/v1/datalake", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// You can use UpdateDataLake to specify where to store your security data, how it should be encrypted at rest and for how long. You can add a Rollup Region to consolidate data from multiple Amazon Web Services Regions, replace default encryption (SSE-S3) with Customer Manged Key, or specify transition and expiration actions through storage Lifecycle management. The UpdateDataLake API works as an "upsert" operation that performs an insert if the specified item or record does not exist, or an update if it already exists. Security Lake securely stores your data at rest using Amazon Web Services encryption solutions. For more details, see Data protection in Amazon Security Lake. For example, omitting the key encryptionConfiguration from a Region that is included in an update call that currently uses KMS will leave that Region's KMS key in place, but specifying encryptionConfiguration: {kmsKeyId: 'S3_MANAGED_KEY'} for that same Region will reset the key to S3-managed. For more details about lifecycle management and how to update retention settings for one or more Regions after enabling Security Lake, see the Amazon Security Lake User Guide.
    ///
    /// Parameters:
    ///   - configurations: Specifies the Region or Regions that will contribute data to the rollup region.
    ///   - metaStoreManagerRoleArn: The Amazon Resource Name (ARN) used to create and update the Glue table. This table contains partitions generated by the ingestion and normalization of Amazon Web Services log sources and custom sources.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateDataLake(
        configurations: [DataLakeConfiguration],
        metaStoreManagerRoleArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateDataLakeResponse {
        let input = UpdateDataLakeRequest(
            configurations: configurations, 
            metaStoreManagerRoleArn: metaStoreManagerRoleArn
        )
        return try await self.updateDataLake(input, logger: logger)
    }

    /// Updates the specified notification subscription in Amazon Security Lake for the organization you specify.
    @Sendable
    @inlinable
    public func updateDataLakeExceptionSubscription(_ input: UpdateDataLakeExceptionSubscriptionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateDataLakeExceptionSubscriptionResponse {
        try await self.client.execute(
            operation: "UpdateDataLakeExceptionSubscription", 
            path: "/v1/datalake/exceptions/subscription", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the specified notification subscription in Amazon Security Lake for the organization you specify.
    ///
    /// Parameters:
    ///   - exceptionTimeToLive: The time-to-live (TTL) for the exception message to remain. It is the duration of time until which the exception message remains.
    ///   - notificationEndpoint: The account that is subscribed to receive exception notifications.
    ///   - subscriptionProtocol: The subscription protocol to which exception messages are posted.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateDataLakeExceptionSubscription(
        exceptionTimeToLive: Int64? = nil,
        notificationEndpoint: String,
        subscriptionProtocol: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateDataLakeExceptionSubscriptionResponse {
        let input = UpdateDataLakeExceptionSubscriptionRequest(
            exceptionTimeToLive: exceptionTimeToLive, 
            notificationEndpoint: notificationEndpoint, 
            subscriptionProtocol: subscriptionProtocol
        )
        return try await self.updateDataLakeExceptionSubscription(input, logger: logger)
    }

    /// Updates an existing subscription for the given Amazon Security Lake account ID. You can update a subscriber by changing the sources that the subscriber consumes data from.
    @Sendable
    @inlinable
    public func updateSubscriber(_ input: UpdateSubscriberRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateSubscriberResponse {
        try await self.client.execute(
            operation: "UpdateSubscriber", 
            path: "/v1/subscribers/{subscriberId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing subscription for the given Amazon Security Lake account ID. You can update a subscriber by changing the sources that the subscriber consumes data from.
    ///
    /// Parameters:
    ///   - sources: The supported Amazon Web Services services from which logs and events are collected. For the list of supported Amazon Web Services services, see the Amazon Security Lake User Guide.
    ///   - subscriberDescription: The description of the Security Lake account subscriber.
    ///   - subscriberId: A value created by Security Lake that uniquely identifies your subscription.
    ///   - subscriberIdentity: The Amazon Web Services identity used to access your data.
    ///   - subscriberName: The name of the Security Lake account subscriber.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateSubscriber(
        sources: [LogSourceResource]? = nil,
        subscriberDescription: String? = nil,
        subscriberId: String,
        subscriberIdentity: AwsIdentity? = nil,
        subscriberName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateSubscriberResponse {
        let input = UpdateSubscriberRequest(
            sources: sources, 
            subscriberDescription: subscriberDescription, 
            subscriberId: subscriberId, 
            subscriberIdentity: subscriberIdentity, 
            subscriberName: subscriberName
        )
        return try await self.updateSubscriber(input, logger: logger)
    }

    /// Updates an existing notification method for the subscription (SQS or HTTPs endpoint) or switches the notification subscription endpoint for a subscriber.
    @Sendable
    @inlinable
    public func updateSubscriberNotification(_ input: UpdateSubscriberNotificationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateSubscriberNotificationResponse {
        try await self.client.execute(
            operation: "UpdateSubscriberNotification", 
            path: "/v1/subscribers/{subscriberId}/notification", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing notification method for the subscription (SQS or HTTPs endpoint) or switches the notification subscription endpoint for a subscriber.
    ///
    /// Parameters:
    ///   - configuration: The configuration for subscriber notification.
    ///   - subscriberId: The subscription ID for which the subscription notification is specified.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateSubscriberNotification(
        configuration: NotificationConfiguration,
        subscriberId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateSubscriberNotificationResponse {
        let input = UpdateSubscriberNotificationRequest(
            configuration: configuration, 
            subscriberId: subscriberId
        )
        return try await self.updateSubscriberNotification(input, logger: logger)
    }
}

extension SecurityLake {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: SecurityLake, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension SecurityLake {
    /// Return PaginatorSequence for operation ``getDataLakeSources(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getDataLakeSourcesPaginator(
        _ input: GetDataLakeSourcesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetDataLakeSourcesRequest, GetDataLakeSourcesResponse> {
        return .init(
            input: input,
            command: self.getDataLakeSources,
            inputKey: \GetDataLakeSourcesRequest.nextToken,
            outputKey: \GetDataLakeSourcesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getDataLakeSources(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accounts: The Amazon Web Services account ID for which a static snapshot of the current Amazon Web Services Region, including enabled accounts and log sources, is retrieved.
    ///   - maxResults: The maximum limit of accounts for which the static snapshot of the current Region, including enabled accounts and log sources, is retrieved.
    ///   - logger: Logger used for logging
    @inlinable
    public func getDataLakeSourcesPaginator(
        accounts: [String]? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetDataLakeSourcesRequest, GetDataLakeSourcesResponse> {
        let input = GetDataLakeSourcesRequest(
            accounts: accounts, 
            maxResults: maxResults
        )
        return self.getDataLakeSourcesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listDataLakeExceptions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listDataLakeExceptionsPaginator(
        _ input: ListDataLakeExceptionsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDataLakeExceptionsRequest, ListDataLakeExceptionsResponse> {
        return .init(
            input: input,
            command: self.listDataLakeExceptions,
            inputKey: \ListDataLakeExceptionsRequest.nextToken,
            outputKey: \ListDataLakeExceptionsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDataLakeExceptions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: Lists the maximum number of failures in Security Lake.
    ///   - regions: The Amazon Web Services Regions from which exceptions are retrieved.
    ///   - logger: Logger used for logging
    @inlinable
    public func listDataLakeExceptionsPaginator(
        maxResults: Int? = nil,
        regions: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDataLakeExceptionsRequest, ListDataLakeExceptionsResponse> {
        let input = ListDataLakeExceptionsRequest(
            maxResults: maxResults, 
            regions: regions
        )
        return self.listDataLakeExceptionsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listLogSources(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listLogSourcesPaginator(
        _ input: ListLogSourcesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListLogSourcesRequest, ListLogSourcesResponse> {
        return .init(
            input: input,
            command: self.listLogSources,
            inputKey: \ListLogSourcesRequest.nextToken,
            outputKey: \ListLogSourcesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listLogSources(_:logger:)``.
    ///
    /// - Parameters:
    ///   - accounts: The list of Amazon Web Services accounts for which log sources are displayed.
    ///   - maxResults: The maximum number of accounts for which the log sources are displayed.
    ///   - regions: The list of Regions for which log sources are displayed.
    ///   - sources: The list of sources for which log sources are displayed.
    ///   - logger: Logger used for logging
    @inlinable
    public func listLogSourcesPaginator(
        accounts: [String]? = nil,
        maxResults: Int? = nil,
        regions: [String]? = nil,
        sources: [LogSourceResource]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListLogSourcesRequest, ListLogSourcesResponse> {
        let input = ListLogSourcesRequest(
            accounts: accounts, 
            maxResults: maxResults, 
            regions: regions, 
            sources: sources
        )
        return self.listLogSourcesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listSubscribers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listSubscribersPaginator(
        _ input: ListSubscribersRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListSubscribersRequest, ListSubscribersResponse> {
        return .init(
            input: input,
            command: self.listSubscribers,
            inputKey: \ListSubscribersRequest.nextToken,
            outputKey: \ListSubscribersResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listSubscribers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of accounts for which the configuration is displayed.
    ///   - logger: Logger used for logging
    @inlinable
    public func listSubscribersPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListSubscribersRequest, ListSubscribersResponse> {
        let input = ListSubscribersRequest(
            maxResults: maxResults
        )
        return self.listSubscribersPaginator(input, logger: logger)
    }
}

extension SecurityLake.GetDataLakeSourcesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SecurityLake.GetDataLakeSourcesRequest {
        return .init(
            accounts: self.accounts,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension SecurityLake.ListDataLakeExceptionsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SecurityLake.ListDataLakeExceptionsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            regions: self.regions
        )
    }
}

extension SecurityLake.ListLogSourcesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SecurityLake.ListLogSourcesRequest {
        return .init(
            accounts: self.accounts,
            maxResults: self.maxResults,
            nextToken: token,
            regions: self.regions,
            sources: self.sources
        )
    }
}

extension SecurityLake.ListSubscribersRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SecurityLake.ListSubscribersRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
